<?php
ob_start();
session_start();
include_once("../UserIncludes/DbConfig.php");
set_magic_quotes_runtime(1);
$adspId = $_REQUEST[adspaceid];
$adsiteId = $_REQUEST[adsiteid];
if($_SESSION['langId']!="")
{
	$langId=$_SESSION['langId'];
}
else
{
	$langId="1";
}
$sql1="select p.*,a.clickPerDay,a.costPerClick FROM ".PRICE." as p,".ADSPSCEMASTER." as a where p.adspaceId='".$adspId."' and p.adspaceId=a.adspaceId order by p.duration asc";
$query1=mysql_query($sql1);


?>

<table cellpadding="2" cellspacing="2" class="login_txt" width="100%">
<tr>
	<td valign="top" align="center" width="10%" class="listHeader">Duration</td>
	<td valign="top" align="center" width="35%"  class="listHeader">Avg. Clicks</td>
	<td valign="top" align="center" width="35%"  class="listHeader">Price</td>
	<td valign="top" align="center" width="30%"  class="listHeader">Avg CPC</td>
</tr>
<?php
while($result1= mysql_fetch_array($query1)){?>
<tr>
	<td valign="top" align="center"><?php echo $result1[duration];?> days</td>
	<td valign="top" align="center"><?php echo ($result1[clickPerDay]*$result1[duration]);?></td>
	<td valign="top" align="center">$<?php echo $result1[ammount];?></td>
	<td valign="top" align="center"><?php echo $result1[costPerClick];?></td>
</tr>
<?php } ?>
</table>